<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>axios-保存用户</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script>

            axios({
                method: 'post',
                url: 'http://localhost:8099/users',
                data: {
                    username: 'jacklove',
                    password: '123456',
                    phone:'14759646781',
                    info: "{\"age\":20,\"city\":\"湖北\"}",
                    balance: 1000
                }
            }).then((response) =>{
                // 响应成功
                console.log("保存成功");
                console.log(response.data.data);
            }).catch((error)=>{
                // 响应失败
                console.log("保存失败");
            })

    </script>
</head>
<body>

</body>
</html>